home *** CD-ROM | disk | FTP | other *** search
/ 1,000+ Great Games / 1_1000 Games.iso / DOSGAMES / POLYINIT.ZIP / POLYLIB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-28  |  1.5 KB  |  60 lines

  1. extern long *SIN, *COS;
  2. extern int xtrans, ytrans, ztrans;
  3. extern int xang, yang, zang;
  4. extern long scal;
  5.  
  6.  
  7. typedef struct
  8. {
  9.     int x,y;
  10. } VERTEX_2D;
  11.  
  12. typedef struct
  13. {
  14.     int color, lados, ptr;
  15.     VERTEX_2D *vertice;
  16. } POL_2D;
  17.  
  18. typedef struct
  19. {
  20.     int x,y,z;
  21. } VERTEX_3D;
  22.  
  23. typedef struct
  24. {
  25.     int vis, lados, color, ptr, norm_ptr;
  26. } POL_3D;
  27.  
  28. typedef struct
  29. {
  30.     int num_of_pols, num_of_ptrs,num_of_verts;
  31.     int pointer_ptr, vertice_ptr;
  32.     POL_3D far *pol;
  33.     int far *pointer;
  34.     VERTEX_3D far *vertice;
  35. } OBJECT;
  36.  
  37. void swap_P3D( POL_3D far *pol, int a, int b );
  38. void swapint( int far *a, int far *b );
  39. void sortpoly( OBJECT far *, POL_3D far *, int far *, VERTEX_3D far * );
  40.  
  41. void getpoly( POL_3D far *, int far *, VERTEX_2D far *,
  42.                         VERTEX_2D far *, int far *,
  43.                             int far *, int );
  44.  
  45. void getpoly_3D( POL_3D far *list, int far *vertxlist,
  46.                     VERTEX_3D far *polylist,
  47.                         VERTEX_3D far *salida, int numpol );
  48.  
  49. void rotate( VERTEX_3D far *pol, int lados, int xang, int yang, int zang );
  50. void translate( VERTEX_3D far *pol, int lados, int xt, int yt, int zt );
  51. void z_persp( VERTEX_3D far *pol, int lados );
  52. void zoom( VERTEX_3D far *pol, int lados );
  53. void copypoly3d( VERTEX_3D far *origen, VERTEX_3D far *destino, int lados );
  54. void copy3to2d( VERTEX_3D far *orig, VERTEX_2D far *dest, int lados );
  55. void polyclip( VERTEX_2D far *pol, int lados );
  56. void copypoly2d( VERTEX_2D far *origen, VERTEX_2D far *destino, int lados );
  57. void mat2vid( VERTEX_2D far *verts, int lados );
  58. void mat2vid_3D( VERTEX_3D far *verts, int lados );
  59.  
  60.